package panel;

import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.FlowLayout;

import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JPanel;
import javax.swing.JToolBar;
import javax.swing.border.Border;

import panel.CenterPanel;
import listener.ToolBarListener;

public class mainPanel extends JPanel{
	public static mainPanel instance=new mainPanel();
	
	public JToolBar tb=new JToolBar();
	public JButton score=new JButton("学生成绩");

	public CenterPanel workingPanel;      

	private mainPanel(){
		tb.add(score);
		score.setEnabled(false);
		tb.setFloatable(false);
		
		setLayout(new BorderLayout());
		add(tb,BorderLayout.NORTH);
		
		workingPanel =new CenterPanel(0.8);
		add(workingPanel,BorderLayout.CENTER);
		addListener();
		add(ScorePage.instance);
	}
	
	private void addListener(){
		ToolBarListener listener=new ToolBarListener();
		
		score.addActionListener(listener);
	}
}
